<!DOCTYPE html>
<!-- document.write(a.toString); -->
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<script type="text/javascript">
		var a =123;
		var b =a.toString(2);
		alert(b);
	</script>

</body>
</html>